package com.example.add;


import java.util.Random;



import com.googlecode.androidannotations.annotations.EFragment;

import android.annotation.SuppressLint;
import android.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Toast;

@SuppressLint("ShowToast")
@EFragment
public class MyFragment extends Fragment {
	@Override
	public void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
	}
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		View view = inflater.inflate(R.layout.view, null);
		Random random = new Random();
		int n = random.nextInt(6);
		switch (n) {
		case 0:
			Toast.makeText(getActivity(), "0", 1).show();		
			break;
		case 1:
			Toast.makeText(getActivity(), "1", 1).show();	
			break;
		case 2:
			Toast.makeText(getActivity(), "2", 1).show();	
			break;
		case 3:
			Toast.makeText(getActivity(), "3", 1).show();	
			break;
		case 4:
			Toast.makeText(getActivity(), "4", 1).show();	
			break;
		case 5:
			Toast.makeText(getActivity(), "5", 1).show();	
			break;
		default:
			break;
		}
		return view;
	}
	@Override
	public void onPause() {
		// TODO Auto-generated method stub
		super.onPause();
	}
}
